package day004;

import java.util.Scanner;

public class Guessing {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int num =(int)(Math.random()*1000+1);


        int guess = scan.nextInt();
        do {
            System.out.println("猜一猜");
            guess= scan.nextInt();
            if (guess>num){
                System.out.println("您猜大了");
            }else if(guess<num){
                System.out.println("您猜小了");
            }else {
                System.out.println("猜对啦");
            }

        }while (guess!=num);


















        /*
        while (guess != num) {
            if (guess>num){
                System.out.println("您猜大了");
            }else {
                System.out.println("您猜小了");
            }
            System.out.println("再来");
            guess = scan.nextInt();
        }
        System.out.println("恭喜您猜对啦");
*/

    }
}
